#include <bits/stdc++.h>

using namespace std;
typedef long long LL;
const LL maxn=50000;
LL primes[maxn],cnt1=0,num1=0;
bitset<maxn> isPrime;
void eulurSeive(LL n)
{
    isPrime.set();
    isPrime[0]=isPrime[1]=0;
    for (LL i=2;i<=n ;++i )
    {
        if (isPrime[i])
        {
            primes[++cnt1]=i;
        }
        for (LL j=1;j<=cnt1&&i*primes[j]<=n ; ++j)
        {
            isPrime[i*primes[j]]=0;
            if (i%primes[j]==0)
            {
                break;
            }
        }
    }
}
struct Factor
{
    LL base,exponent;
}fac[15];
void factor(LL n)
{
    eulurSeive(maxn);
    LL upper=(int)sqrt(1.0*n);
    for (LL j=1;j<=cnt1&&primes[j]<=upper ;++j )
    {
        if (n%primes[j]==0)
        {
            fac[num1].base=primes[j];
            fac[num1].exponent=0;
            while (n%primes[j]==0)
            {
                ++fac[num1].exponent;
                n/=primes[j];
            }
            ++num1;
        }
        if (n==1)
        {
            break;
        }
    }
    if (n!=1)
    {
        fac[num1].base=n;
        fac[num1].exponent=1;
        ++num1;
    }
}
int main_1059()
{
    LL N;
    scanf("%lld",&N);
    if (N==1)
    {
        printf("1=1");
        return 0;
    }
    factor(N);
    printf("%lld=",N);
    --num1;
    for (LL j=0;j<num1 ;++j )
    {
        if (fac[j].exponent==1)
        {
            printf("%lld*",fac[j].base);
        }
        else
        {
            printf("%lld^%lld*",fac[j].base,fac[j].exponent);
        }
    }
    if (fac[num1].exponent==1)
    {
        printf("%lld",fac[num1].base);
    }
    else
    {
        printf("%lld^%lld",fac[num1].base,fac[num1].exponent);
    }
    return 0;
}
